package com.nbsaas.boot.controller.shop;

import com.nbsaas.boot.rest.annotations.*;
import com.nbsaas.boot.rest.response.ListResponse;
import com.nbsaas.boot.rest.response.PageResponse;
import com.nbsaas.boot.rest.response.ResponseObject;
import com.nbsaas.boot.shop.api.domain.request.ShopBannerRequest;
import com.nbsaas.boot.shop.api.domain.request.ShopBannerSearch;
import com.nbsaas.boot.shop.api.domain.response.ShopBannerResponse;
import com.nbsaas.boot.shop.api.domain.simple.ShopBannerSimple;
import com.nbsaas.boot.shop.api.apis.ShopBannerApi;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestBody;
import javax.annotation.Resource;

/**
*  对外控制器
*/
@RestController
@RequestMapping("/shopBanner")
public class ShopBannerController {


    @Resource
    private ShopBannerApi shopBannerApi;

    @RequestMapping("/search")
    public PageResponse <ShopBannerSimple> search(@RequestBody ShopBannerSearch request) {
        return shopBannerApi.search(request);
    }

    @RequestMapping("/list")
    public ListResponse<ShopBannerSimple> list(@RequestBody ShopBannerSearch request) {
        return shopBannerApi.list(request);
    }


}